-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/47 커뮤니티 게시글 삭제 기능 #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…project/WEB1_1_Bongdari_BE into feature/47-add-community-board-delete
|
|
||
| @Override | ||
| public void deleteCommunityBoard(UUID writerId, Long id) { | ||
| CommunityBoard communityBoard = communityBoardRepository.findById(id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아래에 valiadteWriter처럼 메서드로 빼서 추상화 레벨 맞춰주는것도 좋아보여요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵! 수정하겠습니다
m-a-king
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!
| CommunityBoardCreateRequestDto dto = CommunityBoardCreateRequestDto.builder() | ||
| .title("커뮤니티 테스트 제목") | ||
| .content("커뮤니티 테스트 내용") | ||
| .build(); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
중복되는 부분이 눈에 띄는데 @BeforeEach를 사용해보는 것은 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정하겠습니다!
leebs0521
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니당~
| private void validateWriter(CommunityBoard communityBoard, UUID writerId) { | ||
| if (communityBoard.getWriterId().equals(writerId)) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
communityBoard.getWriterId().equals(writerId)
이 부분은 CommunityBoard 메서드 호출해서 하는거 어떻게 생각하세요??
communityBoard.isWriter(writerId); 이런식으로요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TDA 감사합니다
수정하겠습니다!
- findById 메서드로 추출(추상화 레벨 일관성) - ServiceTest 중복되는 부분 @beforeeach로 추출 - CommunityBoard 메서드에 isWriter 추가
|



resolved :
📌 과제 설명
커뮤니티 게시글 삭제 기능
👩💻 요구 사항과 구현 내용
✅ PR 포인트 & 궁금한 점